CFLAGS = /O2

all: sub main.exe

sub: *.c
	$(MAKE) $(**:.c=.obj)

main.exe: *.obj
	link $** /OUT:$@ \
		/NODEFAULTLIB:msvcrt.lib /INCREMENTAL:NO /OPT:REF

clean:
	del *.obj